<!DOCTYPE html>
<html>
<head>
<title>查看佣金</title>
    <#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
		<div class="grid-btn">

            <div class="form-group col-sm-3">
                <select class="form-control" v-model="q.role">
                    <option value="">全部</option>
                    <option value="1" >省代理</option>
                    <option value="2" >市代理</option>
                    <option value="3" >区代理</option>
                    <option value="4" >个人代理</option>
                </select>
            </div>
            <a class="btn btn-default" @click="query">查询</a>

            <#if shiro.hasPermission("sys:advertising:update")>
                <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
            </#if>

		</div>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">

            <!--<div class="form-group">
                <div class="col-sm-2 control-label">用户类型</div>
                <div class="form-group col-sm-8">
                    <select class="form-control" v-model="agencycomm.type" >
                        <option value="0" selected="selected">广告主</option>
                        <option value="1" >供货主</option>
                        <option value="2" >管理员</option>
                        <option value="3" >运维人员</option>
                        <option value="4" >财务人员</option>
                    </select>
                </div>
            </div>-->

            <!--<div class="form-group">
                <div class="col-sm-2 control-label">用户类型</div>
                <div class="col-sm-8">
                    <input type="text" class="form-control" v-model="agencycomm.type" placeholder="用户类型"/>
                </div>
            </div>-->

            <div class="form-group">
                <div class="col-sm-2 control-label">姓名</div>
                <div class="col-sm-8">
                    <input type="text" class="form-control" v-model="agencycomm.name" readonly="readonly" placeholder="姓名"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">电话</div>
                <div class="col-sm-8">
                    <input type="text" class="form-control" v-model="agencycomm.phone" readonly="readonly" placeholder="电话"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">用户角色</div>
                <div class="form-group col-sm-8">
                    <select class="form-control" v-model="agencycomm.role" disabled="disabled">
                        <option value="1" >省代理</option>
                        <option value="2" >市代理</option>
                        <option value="3" >区代理</option>
                        <option value="4" >个人代理</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">代理城市</div>
                <div class="col-sm-8">
                    <input type="text" class="form-control" v-model="agencycomm.city" readonly="readonly" placeholder="代理城市"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">佣金类型</div>
                <div class="form-group col-sm-8">
                    <select class="form-control" v-model="agencycomm.commissionType" id="commType" @click="commValue" >
                        <option value="1" >按比例</option>
                        <option value="2" >按金额</option>
                    </select>
                </div>
            </div>

            <div v-if="agencycomm.id != null">
                <div class="form-group" v-if="agencycomm.commissionType == 1">
                    <div class="col-sm-2 control-label">分佣值(%)</div>
                    <div class="col-sm-8">
                        <input type="number" class="form-control" v-model="agencycomm.commissionValue" placeholder="分佣值"/>
                    </div>
                </div>
            </div>

            <div v-if="agencycomm.id != null">
                <div class="form-group" v-if="agencycomm.commissionType == 2">
                    <div class="col-sm-2 control-label">分佣值(分)</div>
                    <div class="col-sm-8">
                        <input type="number" class="form-control" v-model="agencycomm.commissionValue" placeholder="分佣值"/>
                    </div>
                </div>
            </div>


            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/plugins/jquery.form.js"></script>
<script src="${request.contextPath}/statics/js/modules/sys/agencycomm.js?_${.now?long}"></script>

</body>
</html>